<template>
  <div class="m">
    <div style="width: 320px; margin-right: 20px">
      <div style="height: 194px" class="comp">
        <Lunbo></Lunbo>
        <!-- <img src="..\assets\zhyq\监控视频轮播.png" /> -->
      </div>
      <div style="height: 320px" class="comp">
        <img src="..\assets\zhyq\ren\入园统计.png" />
      </div>
      <div style="height: 230px" class="comp">
        <img src="..\assets\zhyq\ren\人员检测.png" />
      </div>
      <div style="height: 130px" class="comp">
        <img src="..\assets\zhyq\ren\访客通行.png" />
      </div>
    </div>
    <div style="width: 1206px">
      <img src="..\assets\cysj\热力图.png" class="relitu" width="450px" />
      <img src="..\assets\cysj\热力阶梯.png" class="relijieti" />
      <div style="height: 604px">
        <div style="width: 30px; margin-top: 60px">
          <el-button type="text" class="map-button">
            <img src="..\assets\cysj\按钮.png"
          /></el-button>
        </div>
      </div>
      <div style="height: 194px" class="comp">
        <img src="..\assets\zhyq\总览最新事件.png" />
      </div>
    </div>
    <div style="width: 319px !important; margin-left: 20px">
      <div style="height: 177px" class="comp">
        <div class="title">历史告警</div>
        <div style="width: 100%; height: 158px" id="Bar2"></div>
      </div>
      <div style="height: 177px" class="comp">
        <img src="..\assets\zhyq\ren\历史人员流动.png" />
      </div>
      <div style="height: 201px" class="comp">
        <img src="..\assets\zhyq\ren\园内活动人数.png" />
      </div>
      <div style="height: 320px" class="comp">
        <img src="..\assets\zhyq\ren\人员查询.png" />
      </div>
    </div>
  </div>
</template>

<script >
import Lunbo from "@/components/zhyq/Lunbo.vue";
export default {
  components: {
    Lunbo,
  },
  mounted() {
    this.drawBar2();
  },
  methods: {
    drawBar2() {
      let myCHart = this.$echarts.init(document.getElementById("Bar2"));
      let option = {
        grid: {
          top: 35,
          bottom: 40,
        },
        legend: {
          right: 10,
          itemWidth: 12,
          itemHeight: 12,
          icon: "rect",
          data: ["黑名单", "违规人员"],
          textStyle: {
            color: "#ffffff",
            fontSize: 12,
          },
        },
        xAxis: {
          name: "时",
          nameTextStyle: { color: "#fff" },
          data: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
          splitLine: {
            show: false,
          },
          axisLine: {
            show: false,
          },
          axisTick: { show: false },
          axisLabel: {
            textStyle: {
              color: "#ffffff",
              fontSize: 12,
            },
          },
        },
        yAxis: {
          name: "人",
          nameTextStyle: { color: "#fff" },
          axisLine: {
            show: false,
          },
          splitLine: {
            lineStyle: {
              color: "#555",
            },
          },
          axisTick: {
            show: false,
          },
          axisLabel: {
            textStyle: {
              color: "#ffffff",
              fontSize: 12,
            },
          },
        },
        series: [
          {
            name: "黑名单",
            type: "bar",
            stack: "黑名单",
            data: [12, 6, 25, 18, 9, 0, 19, 16, 8, 18, 22, 17, 16, 2],
            barWidth: 10,
            stack: "1",
            itemStyle: {
              color: "#0192ed",
            },
          },
          {
            name: "违规人员",
            type: "bar",
            data: [12, 6, 25, 18, 9, 0, 19, 16, 8, 18, 22, 17, 16, 2],
            stack: "1",
            itemStyle: {
              color: "#e67150",
            },
          },
        ],
      };
      myCHart.setOption(option);
    },
  },
};
</script>

<style lang="less" scoped>
.m {
  display: flex;
  width: 1880px;
  background-image: url("../assets/zhyq/背景地图.png");
}
.comp {
  margin: 20px 0;
  border: 1px solid #3c6fd2;
  background-color: #111e4b;
}
.title {
  color: #1af7ff;
  text-align: left;
  font-size: 16px;
  padding-left: 10px;
  background-image: url(../assets/image/当前检测-标题-背景图片.png);
  background-repeat: no-repeat;
  background-size: 171px 30px;
  line-height: 30px;
  height: 30px;
  font-weight: bold;
}
/deep/.el-button + .el-button {
  margin-left: 0px;
}
/deep/ .map-button {
  padding: 0px 20px;
}
.relitu {
  position: absolute;
  left: 30%;
  bottom: 34%;
}
.relijieti {
  position: absolute;
  left: 77%;
  bottom: 67%;
}
</style>
